<?php
/**
 * Created by PhpStorm.
 * User: wudiying
 * Date: 2019/2/2
 * Time: 下午1:47
 */

namespace IMooc;


class Register
{
   // 注册树 就是将一些对象注册到我们全局的树上，让很多地方直接访问

    static protected $objects;

    static function _set($alias,$object){
        self::$objects[$alias] = $object;
    }

    static function _unset($alias){
        unset(self::$objects[$alias]);
    }

    static function app($alias){
        return self::$objects[$alias];
    }
}